<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>查找dom节点</title>
</head>
<body>
<p id="num"></p>
<script type="text/javascript">
var oP = document.getElementById('num');
var num = 100;
window.setInterval(function () {
	num--;
	if (num >= 50) {
		
		oP.style.color = 'blue';
	}else{
		// oP.innerText = num;
		oP.style.color = 'red';
	}
	oP.innerText = num;
},100);

</script>

</body>
</html>